package com.sixth.controller;

import com.sixth.service.UserService;
import com.sixth.util.CommonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @program: carrent
 * @description:
 * @author: 高振杨
 * @create: 2022-01-12 11:15
 **/
@RestController
@RequestMapping("/login")
public class LoginController {
    @Autowired
    private UserService userService;

    @RequestMapping("/login")
    public CommonResult Login(String loginname, String pwd, HttpServletRequest request){
        CommonResult result = userService.findByLoginnameAndPwd(loginname, pwd,request);
        return result;
    }

}
